package com.fzu.ess.common.entity;

import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by ercha on 2015/10/22.
 */
@Data
@MappedSuperclass
public abstract class BaseEntity implements Serializable{
    @Id
    @GenericGenerator(name="pk_uuid", strategy = "uuid")
    @GeneratedValue(generator = "pk_uuid")
    protected String id;

    @Column(name = "create_date", updatable = false)
    protected Timestamp createDate;

    /**
    0：正常
    1：删除
     */
    @Column(name = "del_flag")
    protected Integer delFlag = 0;
}
